Optimal. Leaf size=65 \[ -\frac {i d \text {Li}_2\left (e^{2 i (a+b x)}\right )}{2 b^2}+\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}-\frac {i (c+d x)^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3717, 2190, 2279, 2391} \[ -\frac {i d \text {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2}+\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}-\frac {i (c+d x)^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3717
Rubi steps
\begin {align*} \int (c+d x) \cot (a+b x) \, dx &=-\frac {i (c+d x)^2}{2 d}-2 i \int \frac {e^{2 i (a+b x)} (c+d x)}{1-e^{2 i (a+b x)}} \, dx\\ &=-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}-\frac {d \int \log \left (1-e^{2 i (a+b x)}\right ) \, dx}{b}\\ &=-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}+\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^2}\\ &=-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b}-\frac {i d \text {Li}_2\left (e^{2 i (a+b x)}\right )}{2 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 5.11, size = 188, normalized size = 2.89 \[ -\frac {d \csc (a) \sec (a) \left (b^2 x^2 e^{i \tan ^{-1}(\tan (a))}+\frac {\tan (a) \left (i \text {Li}_2\left (e^{2 i \left (b x+\tan ^{-1}(\tan (a))\right )}\right )+i b x \left (2 \tan ^{-1}(\tan (a))-\pi \right )-2 \left (\tan ^{-1}(\tan (a))+b x\right ) \log \left (1-e^{2 i \left (\tan ^{-1}(\tan (a))+b x\right )}\right )+2 \tan ^{-1}(\tan (a)) \log \left (\sin \left (\tan ^{-1}(\tan (a))+b x\right )\right )-\pi \log \left (1+e^{-2 i b x}\right )+\pi \log (\cos (b x))\right )}{\sqrt {\tan ^2(a)+1}}\right )}{2 b^2 \sqrt {\sec ^2(a) \left (\sin ^2(a)+\cos ^2(a)\right )}}+\frac {c (\log (\tan (a+b x))+\log (\cos (a+b x)))}{b}+\frac {1}{2} d x^2 \cot (a) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.50, size = 250, normalized size = 3.85 \[ \frac {-i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} \cos \left (b x + a\right ) \csc \left (b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.07, size = 215, normalized size = 3.31 \[ -\frac {i d \,x^{2}}{2}+i c x +\frac {c \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b}+\frac {c \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{b}-\frac {2 c \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {2 i d a x}{b}-\frac {i d \,a^{2}}{b^{2}}+\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}-\frac {i d \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {i d \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {d a \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{2}}+\frac {2 d a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.46, size = 189, normalized size = 2.91 \[ \frac {-i \, b^{2} d x^{2} - 2 i \, b^{2} c x - 2 i \, b d x \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) + 2 i \, b c \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) - 1\right ) + {\left (2 i \, b d x + 2 i \, b c\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 2 i \, d {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) - 2 i \, d {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {\cos \left (a+b\,x\right )\,\left (c+d\,x\right )}{\sin \left (a+b\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right ) \cos {\left (a + b x \right )} \csc {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________